/*
 * @Author: fisher
 * @Date: 2024-03-12 14:22:10
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-03-14 16:14:51
 * @FilePath: \allfront\src\modules\pixelstream\sdk\index.js
 * @Description:
 */
export const SdkMap = [
  {
    id: 0,
    title: '基础',
    children: [
      {
        id: '0_1',
        title: '连接像素流',
        code: `
// 连接像素流 
fpstream.connect();
        `,
      },
      {
        id: '0_2',
        title: '断开像素流',
        code: `
// 断开像素流 
fpstream.disconnect();
        `,
      },
    ],
  },
  {
    id: 1,
    title: '相机',
    children: [
      {
        id: '1_1',
        title: '设置视角',
        code: `
fpstream.Camera.setView({
    Location: {
        X: -594288.4595799337,
        Y: 460229.5602113775,
        Z: 900973.1862497347,
    },
    Rotation: {
        Roll: 0,
        Pitch: -36.00901031494141,
        Yaw: -59.273998205385624,
    },
     // NewZoom: 1247000
    })
        `,
      },
      {
        id: '1_2',
        title: '获取视角',
        code: `
fpstream.Camera.getView(
  (res)=>{
    //此处仅用作页面调试输出日志,不作为开发示例输出日志
    logMessages.push(res)
  }
)
        `,
      },
      {
        id: '1_3',
        title: '播放漫游',
        code: `
fpstream.Camera.playRoaming({
    RoamingPath:[
        {
            Location : {X:0.0,Y:0.0,Z:1000.0},
            Rotation : {Pitch:0.0,Yaw:0.0,Roll:0.0},
            Time     : 5.0
        },
        {
            Location : {X:1000.0,Y:1000,Z:1000.0},
            Rotation : {Pitch:0.0,Yaw:20,Roll:0.0},
            Time     : 5.0
        },
        {
            Location : {X:0.0,Y:0.0,Z:2000.0},
            Rotation : {Pitch:0.0,Yaw:0.0,Roll:0.0},
            Time     : 5.0
        },
        ]
        },(res)=>{
          //此处仅用作页面调试输出日志,不作为开发示例输出日志
            logMessages.push('播放完毕!',res)
        }
        )
        `,
      },
      {
        id: '1_4',
        title: '暂停漫游',
        code: `
fpstream.Camera.pauseRoaming()
        `,
      },
      {
        id: '1_5',
        title: '继续漫游',
        code: `
fpstream.Camera.resumeRoaming()
        `,
      },
      {
        id: '1_6',
        title: '结束漫游',
        code: `
fpstream.Camera.endRoaming()
        `,
      },
      {
        id: '1_7',
        title: '获取漫游节点信息',
        code: `
fpstream.Camera.getRoamingPoint(
  (res)=>{
    //此处仅用作页面调试输出日志,不作为开发示例输出日志
    logMessages.push(res)
  }
)
        `,
      },
      {
        id: '1_8',
        title: '分屏对比',
        code: `
fpstream.Camera.splitScreen(
  {
    Tag1:"方案1",
    Tag2:"方案2"
  }
)
        `,
      },
      {
        id: '1_9',
        title: '取消分屏',
        code: `
fpstream.Camera.cancleSplit()
        `,
      },
    ],
  },
  {
    id: 2,
    title: '测量',
    children: [
      {
        id: '2_1',
        title: '清除',
        code: `
// 清空测量
fpstream.Measure.clear();
        `,
      },
      {
        id: '2_2',
        title: '测点',
        code: `
// 清空测量
fpstream.Measure.activeCoordinates();
// 激活后左键点选标记测量点，右键停止标记
// 如果需要重新标记测量点，请重新激活此方法
        `,
      },
      {
        id: '2_3',
        title: '测距',
        code: `
// 清空测量
fpstream.Measure.activeDistance();
// 激活后左键点选设定点位，右键停止绘制
// 如果需要重新绘制，请重新激活此方法
        `,
      },
      {
        id: '2_4',
        title: '侧面',
        code: `
// 清空测量
fpstream.Measure.activeArea();
// 激活后左键点选设定点位，右键停止绘制
// 如果需要重新绘制，请重新激活此方法
        `,
      },
      {
        id: '2_5',
        title: '测高度',
        code: `
// 清空测量
fpstream.Measure.activeHeight();
// 激活后左键点选两个点位确定测量高度
// 如果需要重新标记测量点，请重新激活此方法
        `,
      },
    ],
  },
  {
    id: 3,
    title: '分析工具',
    children: [
      {
        id: '3_1',
        title: '清除',
        code: `
// 清空测量
fpstream.Analysis.clear();
        `,
      },
      {
        id: '3_2',
        title: '通视分析',
        code: `
// 清空测量
fpstream.Analysis.visualLine();
        `,
      },
      {
        id: '3_3',
        title: '可视域分析',
        code: `
// 清空测量
fpstream.Analysis.visualField();
// 激活后左键点选标记测量点，右键停止标记
// 如果需要重新标记测量点，请重新激活此方法
        `,
      },
      {
        id: '3_4',
        title: '天际线',
        code: `
// 清空测量
fpstream.Analysis.skyline();
// 激活后左键点选设定点位，右键停止绘制
// 如果需要重新绘制，请重新激活此方法
        `,
      },
    ],
  },
  {
    id: 4,
    title: 'Marker',
    children: [
      {
        id: '4_1',
        title: '添加',
        code: `
// 连接像素流 
fpstream.Marker.add(
  {
    Type: '-1',
    InteractionBtnImage:
      "/Script/Engine.Texture2D'/Game/DEV/Texture/POI/T_AQYH_Text.T_AQYH_Text'",
    CustomPoiPath:
      "/Script/Engine.Blueprint'/Game/DEV/UMG/POI/BP_POI_AQZL.BP_POI_AQZL_C'",

    Infos: [
      {
        Poi_Id: '1580867581750059009',
        Location: {
          X: -42650.443461000003,
          Y: 121736.440378,
          Z: 30000,
        },
        Text: '招商3#仓',
        Group: '1263916785458',
      },
      {
        Poi_Id: '1580867579917148162',
        Location: {
          X: -41803.030460000002,
          Y: 124805.547938,
          Z: 30000,
        },
        Text: '招商2#仓',
        Group: '1263916785458',
      },
    ],
  },
  res => {
    console.log('add poi', res);
  },
);
        `,
      },
      {
        id: '4_2',
        title: '通过id删除',
        code: `
// 断开像素流 
fpstream.Marker.deleteById({
     Poi_Id: "1580867581750059009",
});
        `,
      },
    ],
  },
  {
    id: 5,
    title: '天气',
    children: [
      {
        id: '5_1',
        title: '设置时间',
        code: `
// 连接像素流 
fpstream.Weather.setTime(
  {
    h:12
  }
);
        `,
      },
    ],
  },
];
